package com.hnkywl.sts.entity.cggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.organ.Gsjg;
import com.hnkywl.sts.entity.organ.Qyjg;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * 资金补差单
 * Created with IntelliJ IDEA.
 * User: ZHUCHG
 * Date: 13-4-15
 * Time: 下午4:45
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_BIZ_ZJDCD")
@Where(clause = "deleted!='1'")
public class Zjbcd extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqZjbcd", allocationSize = 1, sequenceName = "SEQ_BIZ_ZJBCD")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqZjbcd")
    private Long id;
    //类型
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SJZDZ_LB_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sjzdz lb;
    //金额
    private Double je;
    //采购单
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CGD_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Cgd cgd;

    @ManyToOne
    @JoinColumn(name = "CGDMX_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Cgdmx cgdmx;


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JSD_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Jsd jsd;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "GYS_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg gys;

    //备注
    private String bz;

    /**
     * 已使用，未使用
     */
    private String zt;

    /**
     * 关联流程实体
     */
    @Basic
    @Column(name = "LC_ID")
    private String processInstanceId;

    /**
     * 是否调整生成
     */
    private Boolean sftzsc = false;


    private Long oldId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Sjzdz getLb() {
        return lb;
    }

    public void setLb(Sjzdz lb) {
        this.lb = lb;
    }

    public Double getJe() {
        return je;
    }

    public void setJe(Double je) {
        this.je = je;
    }

    public Cgd getCgd() {
        return cgd;
    }

    public void setCgd(Cgd cgd) {
        this.cgd = cgd;
    }

    public Cgdmx getCgdmx() {
        return cgdmx;
    }

    public void setCgdmx(Cgdmx cgdmx) {
        this.cgdmx = cgdmx;
    }

    public Jsd getJsd() {
        return jsd;
    }

    public void setJsd(Jsd jsd) {
        this.jsd = jsd;
    }

    public Gsjg getGys() {
        return gys;
    }

    public void setGys(Gsjg gys) {
        this.gys = gys;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getZt() {
        return zt;
    }

    public void setZt(String zt) {
        this.zt = zt;
    }

    public Boolean getSftzsc() {
        return sftzsc;
    }

    public void setSftzsc(Boolean sftzsc) {
        this.sftzsc = sftzsc;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public Long getOldId() {
        return oldId;
    }

    public void setOldId(Long oldId) {
        this.oldId = oldId;
    }
}
